<template>
  <div>
    <bread class="filter">
      <h1>校管项目活动管理
        <span class="el-icon-arrow-right icon"></span>
        <span class="sub-title">2018年校级教研重点项目</span>
      </h1>
      <normal-filter
        :label="filters.text"
        @change="handleLanguage"
        :options="filters.dataset"
        class="filter-block">
      </normal-filter>
    </bread>
    <pageContent hasPagination>
      <div class="view-center">
        <h1>中山大学2018年度教研创新活动 项目立项初审</h1>
        <p>李教授 您好！欢迎参加「中山大学2018年度教研创新活动 项目立项初审」 ，请您仔细阅读项目相关附件，感谢您的大力协助！</p>
        <el-table
          :data="tableData"
          header-row-class-name="custom-table-header-dark-gray"
          style="width: 100%">
          <el-table-column
            prop="num"
            label="序号"
            width="150">
          </el-table-column>
          <el-table-column
            prop="name"
            label="课题名称"
            >

          </el-table-column>
          <el-table-column
            prop="province"
            label="评审截止时间"
            width="120">
          </el-table-column>
          <el-table-column
            label="操作"
            width="120">
            <template slot-scope="scope">
              <el-button type="primary" size="mini">评 审</el-button>
              <el-button type="text">查 看</el-button>
            </template>

          </el-table-column>
        </el-table>
      </div>
    </pageContent>
    <pagination
      :total="total"
      :page-size="pageSize"
      @changePage="fetchData">
    </pagination>
  </div>

</template>

<script>
import pagination from 'components/pagination';
import NormalFilter from 'components/NormalFilter';
import PopFilter from 'components/PopFilter';

export default {
  name: 'hello',
  data () {
    return {

      tableData: [{
          num: 1,
          date: '2016-05-03',
          name: '王小虎',
          province: '上海',
          city: '普陀区',
          address: '上海市普陀区金沙江路 1518 弄',
          zip: 200333
        }, {
          num: 1,
          date: '2016-05-02',
          name: '王小虎',
          province: '上海',
          city: '普陀区',
          address: '上海市普陀区金沙江路 1518 弄',
          zip: 200333
        }, {
          num: 1,
          date: '2016-05-04',
          name: '王小虎',
          province: '上海',
          city: '普陀区',
          address: '上海市普陀区金沙江路 1518 弄',
          zip: 200333
        }, {
          num: 1,
          date: '2016-05-01',
          name: '王小虎',
          province: '上海',
          city: '普陀区',
          address: '上海市普陀区金沙江路 1518 弄',
          zip: 200333
        }],
      total: 1000,
      pageSize: 30,
      filters: {
        dataset: [{txt: '全部', val: '0'}, {txt: '中文成果', val: '1'}, {txt: '英文成果', val: '2'}],
        text: '评审状态'
      },
      statusFilterOptions: [{txt: '全职', val: '3'}, {txt: '兼职', val: '2'}, {txt: '退休', val: '1'}],
    }
  },
  methods: {
    createPro(){
      this.$router.push('/index/intramural-project/project-create')
    },
    getColumnWidth(item) {
      switch (item.en) {
      case 'b':
      case 'd':
      case 'e':
      case 'f':
      case 'g':
        return 100;
      case 'h':
        return 120;
      }
    },
    fetchData(page) {
      // console.log(page);
    },
    openMessageBox() {
      this.$confirm('点击确认后，将向学院管理员发送考核提交提醒通知。', '提醒学院提交考核', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
      }).then(() => {
        this.$message({
          type: 'success',
          message: '删除成功!'
        });
      }).catch(() => {
        this.$message({
          type: 'info',
          message: '已取消删除'
        });
      });
    },
    handleLanguage() {

    },
    handlePopChange() {

    },
  },
  components: {
    pagination,
    NormalFilter,
    PopFilter
  }
};
</script>
<style scoped lang="scss">
  .primary-color {
    color: var(--success-color);
  }
  .cur_select {
    margin-left: 20px;
  }
  .view-center {
    width: 960px;
    margin: 0 auto;
    h1 {
      padding-top: 50px;
      font-size:24px;
      font-weight: normal;
      color:rgba(48,49,51,1);
    }
    p {
      margin-top: 10px;
      margin-bottom: 30px;
      color: #333333;
    }
  }
</style>
